package com.czr.frame.test;


import java.util.Date;
import com.czr.frame.beans.User;
/**
 * 增删改查测试 spring hibernateTemplate
 * @author chenzhirong
 *
 */
import com.czr.frame.util.dao.GenericDAO;
public class DBMethom{
	public static void main(String[] args) {
		
	}
	private GenericDAO dao;

	public void setDao(GenericDAO dao) {
		this.dao = dao;
	}

	public void findByID(){
		User user = new User();
		user.setUsername("chenzhirong");
		user.setUsercode("chenzhirong");
		user.setZt(1L);
		user.setCreatetime(new Date());
		user.setUpdatetime(new Date());
		user.setEmail("email");
		user.setJb(1L);
		user.setPassword("111111");
		dao.save(user);
	}
}
